<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>海创数字</title>
<link href="/think_boot/Public/css/bootstrap.min.css" rel="stylesheet">
<link href="/think_boot/Public/font-awesome/css/font-awesome.css" rel="stylesheet">
<link href="/think_boot/Public/css/plugins/uploadify/uploadify.css" rel="stylesheet">
<link href="/think_boot/Public/css/plugins/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css" rel="stylesheet">
<link href="/think_boot/Public/css/animate.css" rel="stylesheet">
<link href="/think_boot/Public/css/style.css" rel="stylesheet">
</head>
<body class="skin-1">
	<div id="wrapper">
		
<meta charset="utf-8">
<nav class="navbar-default navbar-static-side" role="navigation">
	<div class="sidebar-collapse">
		<ul class="nav metismenu" id="side-menu">
			<li class="nav-header">
				<div class="dropdown profile-element">
					<span> <img alt="image" class="img-circle" src="<?php echo C('ADMIN_AVATAR');?>" width="48" height="48" />
					</span> <a data-toggle="dropdown" class="dropdown-toggle" href="#"> <span class="clear"> <span class="block m-t-xs"> <strong class="font-bold"><?php echo C('ADMIN_NAME');?></strong>
						</span> <span class="text-muted text-xs block"><?php echo C('ADMIN_GROUP_NAME');?> <b class="caret"></b></span>
					</span>
					</a>
					<ul class="dropdown-menu animated fadeInRight m-t-xs">
						<li><a href="?c=accountmanage&a=modify&id=<?php echo C('ADMIN_ID');?>">Profile</a></li>
						<li class="divider"></li>
						<li><a href="?c=Index&a=logout">Logout</a></li>
					</ul>
				</div>
				<div class="logo-element">HC+</div>
			</li>
			<li id="index" class="menu-left-menu menu-left-hide">
				<a href="?c=index&a=index">
					<i class="fa fa-plug"></i> 
					<span class="nav-label">系统首页</span> 
				</a>
			</li>
			<li id="admanage" class="menu-left-menu menu-left-hide">
				<a href="?c=admanage&a=index">
					<i class="fa fa-file-movie-o"></i> 
					<span class="nav-label">广告管理</span>
					<span class="fa arrow"></span>
				</a>
				<ul class="nav nav-second-level collapse">
					<li id="admanageindex" class="menu-left-menu menu-left-hide"><a href="?c=admanage&a=index">广告列表</a></li>
					<li id="admanageadd" class="menu-left-menu menu-left-hide"><a href="?c=admanage&a=add">添加列表</a></li>
				</ul>
			</li>
			<li id="authmanage" class="menu-left-menu menu-left-hide">
				<a href="?c=authmanage&a=index">
					<i class="fa fa-users"></i> 
					<span class="nav-label">权限管理</span>
					<span class="fa arrow"></span>
				</a>
				<ul class="nav nav-second-level collapse">
					<li id="authmanageindex" class="menu-left-menu menu-left-hide"><a href="?c=authmanage&a=index">权限分组</a></li>
					<li id="authmanageadd" class="menu-left-menu menu-left-hide"><a href="?c=authmanage&a=add">添加分组</a></li>
				</ul>
			</li>
			<li id="accountmanage" class="menu-left-menu menu-left-hide">
				<a href="?c=accountmanage&a=index">
					<i class="fa fa-user"></i> 
					<span class="nav-label">账号管理</span>
					<span class="fa arrow"></span>
				</a>
				<ul class="nav nav-second-level collapse">
					<li id="accountmanageindex" class="menu-left-menu menu-left-hide"><a href="?c=accountmanage&a=index">账号列表</a></li>
					<li id="accountmanageadd" class="menu-left-menu menu-left-hide"><a href="?c=accountmanage&a=add">添加账号</a></li>
				</ul>
			</li>
			<li id="logmanage" class="menu-left-menu menu-left-hide">
				<a href="?c=logmanage&a=index">
					<i class="fa fa-table"></i> 
					<span class="nav-label">日志首页</span> 
				</a>
			</li>
			<li id="systemmanage" class="menu-left-menu menu-left-hide">
				<a href="?c=systemmanage&a=index">
					<i class="fa fa-gear"></i> 
					<span class="nav-label">系统功能</span>
				</a>
			</li>
		</ul>
	</div>
</nav>

		<div id="page-wrapper" class="gray-bg">
			<meta charset="utf-8">
<div class="row border-bottom">
	<nav class="navbar navbar-static-top white-bg" role="navigation"
		style="margin-bottom: 0">
		<div class="navbar-header">
			<a class="navbar-minimalize minimalize-styl-2 btn btn-primary "
				href="#"><i class="fa fa-bars"></i> </a> <a class="btn btn-link"
				href="#" style="margin-top: 12px;"> <i class="fa fa-home"></i>
				系统首页
			</a>
		</div>
		<ul class="nav navbar-top-links navbar-right">
			<li><span class="m-r-sm text-muted welcome-message">欢迎<span
					class="text-success">[<?php echo C('ADMIN_NAME');?>]</span>访问此系统
			</span>
			<input style="display:none" id="auth_name_id" value="<?php echo C('AUTH_NAME');?>"/>
			<input style="display:none" id="controller_name_id" value="<?php echo C('CONTROLLER_NAME');?>"/>
			<input style="display:none" id="controller_group_id" value="<?php echo C('GROUP_ID');?>"/>
			<li class="dropdown" style="color: #9ea6b9;"><a
				class="dropdown-toggle count-info" data-toggle="dropdown" href="#">
					<i class="fa fa-envelope"></i> 消息</span>
			</a>
				<ul class="dropdown-menu dropdown-messages">
					<li>
						<div class="dropdown-messages-box">
							<a href="profile.html" class="pull-left"> <img alt="image"
								class="img-circle" src="/think_boot/Public/img/a7.jpg">
							</a>
							<div>
								<small class="pull-right">46h ago</small> <strong>Mike
									Loreipsum</strong> started following <strong>Monica Smith</strong>. <br>
								<small class="text-muted">3 days ago at 7:58 pm -
									10.06.2014</small>
							</div>
						</div>
					</li>
				</ul></li>
			<li><a href="?c=accountmanage&a=modify&id=<?php echo C('ADMIN_ID');?>"> <i class="fa fa-gear"></i> <span>个人设置</span></a></li>
			<li><button
					style="color: #999c9e; font-weight: bold; border: 0; background: none; padding: 20px 10px; min-height: 50px;"
					type="button" data-toggle="modal" data-target="#changePsd">
					<i class="fa fa-unlock-alt" style="margin-right: 6px;"></i>修改密码
				</button></li>
			<div id="changePsd" class="fade modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
				<div class="modal-dialog">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal">
								<span aria-hidden="ture">&times;</span> <span class="sr-only">Close</span>
							</button>
							<h4 class="modal-title" id="myModalLable">修改账号密码</h4>
						</div>
						<div class="modal-body">
							<form action="http://localhost/think_boot/index/changePwd" enctype="multipart/form-data" class="validation" method="post" id="signupForm">
								<div class="row">
									<div class="col-md-11">
									<fieldset class="form-horizontal">
										<div class="form-group">
											<label class="col-md-3 control-label">原登录密码</label>
											<div class="col-md-9">
												<input type="password" class="form-control validate[required,minSize[6],maxSize[16]]" name="old_password"/>
												<span class="help-block m-b-none">填写原登录密码（6-16位）。</span>
											</div>
										</div>

										<div class="form-group">
											<label class="col-md-3 control-label">修改密码</label>
											<div class="col-md-9">
												<input type="password" class="form-control validate[required,minSize[6],maxSize[16]]" id="new_password" name="new_password">
												<span class="help-block m-b-none">填写密码可重置登录密码（6-16位）。</span>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-3 control-label">确认修改密码</label>
											<div class="col-md-9">
												<input type="password" class="form-control validate[required,minSize[6],maxSize[16],equals[new_password]]" id="confirm_password" name="confirm_password">
												<span class="help-block m-b-none">请重复输入密码（6-16位）。</span>
											</div>
										</div>
									</fieldset>
									</div>
								</div>
							</form>
						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-default"
								data-dismiss="modal">关闭</button>
							<button type="button" class="btn btn-primary submitbtn">确认</button>
						</div>
					</div>
				</div>
			</div>
			<li><a href="?c=index&a=logout"> <i class="fa fa-sign-out"></i>
					退出
			</a></li>
		</ul>
	</nav>
</div>
			<div class="row wrapper border-bottom white-bg page-heading">
				<div class="col-lg-10">
					<h2>广告列表</h2>
					<ol class="breadcrumb">
						<li><a href="?c=index&a=index">管理平台</a></li>
						<li><a href="?c=admanage&a=index">广告管理</a></li>
						<li class="active"><strong>添加广告</strong></li>
					</ol>
				</div>
				<div class="col-lg-2"></div>
			</div>
			<div class="wrapper wrapper-content animated fadeIn">

				<div class="row ecommerce">
					<div class="col-lg-12">
						<div class="tabs-container m-b-lg">
							<ul class="nav nav-tabs">
								<li class="active"><a href="javascript:;">广告信息</a></li>
							</ul>
							<div class="tab-content">
								<!--tab1-->
								<div class="tab-pane active">
									<div class="panel-body">
										<form enctype="multipart/form-data" class="validation" >
											<div class="row">
												<div class="col-sm-5">
													<fieldset class="form-horizontal">
														<div class="form-group" id="validation_title">
															<label class="col-sm-4 control-label">广告主题:</label>
															<div class="col-sm-8">
																<input
																	class="form-control validate[required,minSize[1],maxSize[30]]"
																	name="ad_title" value="" type="text"> <span
																	class="help-block m-b-none">请输入1~30个字（必填）。</span>
															</div>
														</div>														
														<div class="form-group" id="validation_weight">
															<label class="col-sm-4 control-label">广告权重:</label>
															<div class="col-sm-8">
																<input
																	class="form-control validate[required,minSize[1],maxSize[2]]"
																	name="ad_weight" value="" type="text"> <span
																	class="help-block m-b-none">请输入1~2个数字（必填）。</span>
															</div>
														</div>	
														<div class="form-group">
															<label class="col-sm-4 control-label">广告链接:</label>
															<div class="col-sm-8">
																<input
																	class="form-control"
																	name="ad_link" value="" type="text"> <span
																	class="help-block m-b-none">请输广告的超级链接。</span>
															</div>
														</div>
														<div class="form-group" id="validation_url">
															<label class="col-sm-4 control-label">广告地址:</label>
															<div class="col-sm-8">
																<input class="form-control validate[required,minSize[1],maxSize[128]]" name="ad_fileurl" value="" readonly="readonly" type="text">
																<span class="help-block m-b-none">请输入1~256个字（必填）。</span>
															</div>
														</div>
														<div class="form-group">
		                                    				<div class="col-sm-8 col-sm-offset-4">
				                               		 			<div style="height: 30px; width: 120px;" class="uploadify" id="file_upload"><div style="height: 30px; line-height: 30px; width: 120px;" class="uploadify-button " id="file_upload-button"><span class="uploadify-button-text">上传文件</span></div></div><div class="uploadify-queue" id="file_upload-queue"></div>
				                                				<span class="help-block m-b-none">目前只支持'jpg', 'gif', 'png'文件。</span>
		                                    				</div>
		                                				</div>												
														<!--提交按钮-->
														<div class="col-sm-12 text-center m-t m-b-lg">
															<button type="submit"
																class="btn btn-lg btn-w-m btn-danger ladda-button submit_btn"
																data-loading-text="提交中...">提交保存</button>
														</div>
													</fieldset>
												</div>
											</div>
										</form>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>

			</div>
		</div>
	</div>
		<!-- Mainly scripts -->
		<script src="/think_boot/Public/js/jquery-2.1.1.js"></script>
		<script src="/think_boot/Public/js/bootstrap.min.js"></script>
		<script src="/think_boot/Public/js/plugins/metisMenu/jquery.metisMenu.js"></script>
		<script src="/think_boot/Public//js/uploadPreview.js"></script>
		<script src="/think_boot/Public/js/v_post.js"></script>
		<script src="/think_boot/Public/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
		<script src="/think_boot/Public/js/menu.js"></script>		
		
		<!-- Custom and plugin javascript -->
		<script src="/think_boot/Public/js/inspinia.js"></script>
		<script src="/think_boot/Public/js/plugins/pace/pace.min.js"></script>
		<script src="/think_boot/Public/js/plugins/uploadify/jquery.uploadify.min.js"></script>
		<script src="/think_boot/Public/js/admanage/add.js"></script>	
		
		<script type="text/javascript">

		<?php $timestamp = time();?>
		$(function() {
			$('#file_upload').uploadify({
				'formData'     : {
					'timestamp' : '<?php echo $timestamp;?>',
					'token'     : '<?php echo md5('unique_salt' . $timestamp);?>'
				},
		        "buttonText"      : "上传文件",
				'swf'      : '/think_boot/Public/js/plugins/uploadify/uploadify.swf',
				'uploader' : '/think_boot/Public/js/plugins/uploadify/uploadify.php',
				'fileTypeExts'      : '*.jpg; *.png; *.gif;',
				"onUploadSuccess" : uploadPicture
			});
		});
		
		//可以根据自己的要求来做相应处理
	    function uploadPicture(file, data){
	        if(data != '0'){
	            $("input[name='ad_fileurl']").val(data);
	        }
	    }    

		</script>
			</body>
			</html>